package base;

import model.MsgContact;
import exceptions.InitializedException;

public interface Comm {
	
	/** initializes the communication class 
	 * @throws InitializedException */
	public void init(String client, int img) throws InitializedException;

	/** sends a message to the connected user */
	public boolean send(String url, String msg);
	
	/** return a string with the user found by an inquiry */
	public MsgContact[] search();
	/** starts the receiver for the given url, and registers the listener for when a message is received */
	public boolean startReceiver(MessageListener listener);
	/** stops the receiver */
	public boolean stopReceiver();
	
	public String getAddress();
	public void cleanup();
}
